{% extends 'base/setting_base.html' %}

{% block body %}

    <div class="row justify-content-md-center">
        <div class="col-8">
            <div class="card">
                <div class="card-body">
                    <div class="d-md-flex align-items-center">
                        <h1 class="card-title">Add User</h1>
                    </div>
                    <br>
                    <div class="card">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="card">
                                    <div class="widget-box">
                                        <form class="form-horizontal" action="{% url 'users:add_user' %}"
                                              method="POST">{% csrf_token %}
                                            <div class="form-group ">
                                                <label>Name</label>
                                                <input name="name" class="form-control" type="text" placeholder="Name">
                                            </div>
                                            <div class="form-group ">
                                                <label>Email</label>
                                                <input name="email" class="form-control" type="text"
                                                       placeholder="Email">
                                            </div>
                                            <div class="form-group ">
                                                <label>Password</label>
                                                <input name="password" class="form-control" type="password"
                                                       placeholder="Password">
                                            </div>
                                            <div class="form-group ">
                                                <label>Organization</label>
                                                <div class="dtsb-criteria">
                                                    <select class="form-control dtsb-data dtsb-dropDown" name="organization" style="width: 100%; height:36px;">
                                                        <option value="" selected>---------</option>
                                                        {% for data in org %}
                                                            <option value="{{ data.pk }}">{{ data.name }}</option>{% endfor %}
                                                    </select>
                                                </div>
                                            </div>

                                            <div class="form-group ">
                                                <label>Role</label>
                                                <div class="dtsb-criteria">
                                                    <select class="form-control dtsb-data dtsb-dropDown" name="role"
                                                            style="width: 100%; height:36px;">
                                                        <option value="" selected>---------</option>
                                                        <option value="1">Admin</option>
                                                        <option value="2">Analyst</option>
                                                        <option value="3">Viewer</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="border-top">
                                                <div class="card-body">
                                                    <button type="submit" class="btn btn-default">Save
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}